<?php

namespace Database\Seeders;

use App\Models\Article;
use Illuminate\Database\Seeder;

class ArticleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $article = new Article(['title' => '服务相关']);
        $article->save();
        $data = [
            [
                'pid' => 0,
                'user_id' => 1,
                'title' => '服务与标准',
                'name' => 'SERVICE',
                'preview' => '',
                'keywords' => '服务',
                'description' => '',
                'url' => '',
                'homeshow' => true,
                'type' => 1,
                'structure' => 1,
            ],
            [
                'pid' => 1,
                'user_id' => 1,
                'title' => '服务项目',
                'name' => 'SERVICE',
                'preview' => '',
                'keywords' => '项目',
                'description' => '拥有十七年线下的服务经验 制定了行业服务的标准和规范 专业客服一对一管家式模式 给您完美的服务体验 为消费者带来最专业的保洁服务',
                'url' => '',
                'homeshow' => true,
                'type' => 1,
                'structure' => 1,
            ],
            [
                'pid' => 1,
                'user_id' => 1,
                'title' => '服务优势',
                'name' => 'SERVICE advantages',
                'preview' => '',
                'keywords' => '优势',
                'description' => '拥有十七年线下的服务经验 制定了行业服务的标准和规范 专业客服一对一管家式模式 给您完美的服务体验 为消费者带来最专业的保洁服务',
                'url' => '',
                'homeshow' => true,
                'type' => 1,
                'structure' => 1,
            ]
        ];
        foreach ($data as $key => $item) {
            $article->categories()->create($item);
        }
    }
}
